package com.fancy.music.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fancy.music.entity.SongTag;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SongTagMapper extends BaseMapper<SongTag> {

    /**
     * 根据歌曲ID查询标签
     */
    List<SongTag> selectBySongId(@Param("songId") Long songId);

    /**
     * 根据标签名查询歌曲标签
     */
    List<SongTag> selectByTagName(@Param("tagName") String tagName);

    /**
     * 批量删除歌曲标签
     */
    void deleteBySongId(@Param("songId") Long songId);
}
